﻿
namespace SistemaLogistica.Business.Logic
{
    using System;
    using System.Collections.Generic;
    using SistemaLogistica.Business.Entities;
    using SistemaLogistica.DataAccess;

    public class FormularioManager
    {
        private FormularioManager() { }

        private static readonly FormularioManager instancia = new FormularioManager();

        public static FormularioManager Instancia
        {
            get { return instancia; }
        }

        public List<Formulario> ListarPorMenus(byte menusID)
        {
            try
            {
                return FormularioData.Instancia.ListarPorMenu(menusID);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        public Formulario ObtenerPorID(byte formularioID)
        {
            try
            {
                return FormularioData.Instancia.ObtenerPorID(formularioID);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
    }
}
